public class J20250501 {
    public static void main1(String[] args) {
        Student student = new Student();              //通过new实例化对象
        student.Class = "2班";
        student.name = "JoJo";
        student.gender = "男";
        student.age = 18;
        student.score = 100;

        student.DoClass() ;                           //使用成员方法
        System.out.println("姓名：" + student.name);
        System.out.println("性别：" + student.gender);
        System.out.println("年龄: " + student.age);
        System.out.println("分数：" + student.score);

        System.out.println("-------------");

        Student student2 = new Student();             //通过new实例化对象
        student.Class = "1班";
        student.name = "CoCo";
        student.gender = "女";
        student.age = 17;
        student.score = 100;

        student.DoClass() ;                           //使用成员方法
        System.out.println("姓名：" + student.name);
        System.out.println("性别：" + student.gender);
        System.out.println("年龄: " + student.age);
        System.out.println("分数：" + student.score);

    }


    public static void main(String[] args) {
        Person person = new Person("jojo",9);
        System.out.println("----------");
        Person person1 = new Person();
        Person person2 = new Person("COCO");
        Person person3 = new Person(1);

        Person person4 = new Person();
        System.out.println(person4);
    }
}
